package com.eascs.workflow.config;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.eascs.rabbitmq.common.Producer;

@Service
public class RabbitmqConfig implements InitializingBean {

	@Autowired
	Producer producer;

	@Override
	public void afterPropertiesSet() throws Exception {
		new Thread(new Runnable() {
			public void run() {
				producer.start();
			}
		}).start();
	}

}
